<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //打印人的一生
        var age = 1;
        while (age <= 100) {
            console.log('这个人今年' + age + '岁了');
            age++;
        }
        //1~100之间的所有整数和
        var i = 1;
        var sum = 0;
        while (i <= 100) {
            sum = sum + i;
            i++;
        }
        console.log(sum);
        //你必须爱我
        var sos = prompt('你爱我吗？');
        while (sos !== '我爱你') {
            sos = prompt('你爱我吗？');
        }
        alert('我也爱你');

    </script>
</head>

<body>

</body>

</html>